package com.example.crm.web.config;

import com.example.crm.web.filter.AuthorizationFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Configuration;

import javax.servlet.Filter;

@Configuration
public class FilterConfig {
    public FilterRegistrationBean filterRegist(){
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter((Filter) new AuthorizationFilter());
        registration.addUrlPatterns("/main");
        return registration;
    }
}
